package com.eastcode.mobile.server.user.view;

import java.util.Map;

import com.eastcode.base.view.BaseView;

public class ContactView extends BaseView {

	private String searchName = "";

	private String searchCode = "";

	private String searchState = "";

	public String getSearchName() {
		return searchName;
	}

	public void setSearchName(String searchName) {
		this.searchName = searchName;
	}

	public String getSearchCode() {
		return searchCode;
	}

	public void setSearchCode(String searchCode) {
		this.searchCode = searchCode;
	}

	public String getSearchState() {
		return searchState;
	}

	public void setSearchState(String searchState) {
		this.searchState = searchState;
	}

	@Override
	public Map<String, String> getParamMap() {
		Map<String, String> paramMap = super.getParamMap();
		if (searchName != null && searchName.length() > 0) {
			paramMap.put("name", searchName);
		}
		if (searchCode != null && searchCode.length() > 0) {
			paramMap.put("code", searchCode);
		}
		if (searchState != null && searchState.length() > 0) {
			paramMap.put("state", searchState);
		}
		return paramMap;
	}
}
